package com.yang.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Description TimeU.java
 * @author equat
 * @date 2018/03/12 22:50:62
 */
public class TimeU {
    public static final String DATATIME = "yyyy-MM-dd HH:mm:ss";

    public static String dateTimeFormate(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat(DATATIME);
        return sdf.format(date);
    }
    
    public static void main(String[] args) {
        String dateStr = dateTimeFormate(new Date());
        System.out.println(dateStr);
    }
}
